home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 23 / AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso / Tools / Text-Viewer / MSWordView / mswordview_src / helper-scripts / nsopen < prev    next >
Encoding:
Text File  |  1999-11-06  |  411 b   |  23 lines

  1. #!/bin/tcsh
  2.  
  3. if ($#argv != 1) then
  4.     echo "Usage: $0 file"
  5.     exit 1
  6. endif
  7.  
  8. set file = $argv[1]
  9. if (!(-r $file)) then
  10.     echo "$0: File $file cannot be read"
  11.     exit 1
  12. endif
  13.  
  14. #Try to open file in an existing netscape window
  15. (netscape -remote "openFile(${file})") >& /dev/null
  16.  
  17. #if this fails, it means that netscape is not running, so start it
  18. if ($status) then
  19.   netscape -no-install file:${file}
  20. endif
  21.  
  22.  
  23.